package com.example.demo;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;

import com.alibaba.android.arouter.launcher.ARouter;
import com.example.bar_chart.BarChartActivity;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        findViewById(R.id.tv_bar_chart).setOnClickListener(this);

        ARouter.getInstance().build(BarChartActivity.PATH).navigation();
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.tv_bar_chart:
                ARouter.getInstance().build(BarChartActivity.PATH).navigation();
                break;
        }
    }
}
